﻿<Authorization:AuthorizationControlBase x:Class="jSLCore.Client.Presentation.Authorization.AuthotizationControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:BaseControl="clr-namespace:jSLCore.Client.Presentation.BaseControl" 
    xmlns:Controls="clr-namespace:jSLCore.Client.Presentation.Controls"
                         xmlns:jBinding="clr-namespace:jSLCore.Client.Presentation.jBinding"
                         xmlns:BaseValidationRules="clr-namespace:jSLCore.Client.Presentation.jBinding.BaseValidationRules"
                                        xmlns:Authorization="clr-namespace:jSLCore.Client.Presentation.Authorization"
                                        Width="300">
        <Border BorderBrush="Black" BorderThickness="1" CornerRadius="5">
        <StackPanel >                
                <Controls:LeftHeaderContainer  Header="Имя пользователя:">
                <TextBox Name="loginTxt">
                    <BaseControl:DataControl.jBinding>
                        <jBinding:jNullContextBinding>                            
                                <BaseValidationRules:jNotEmptyStringRule ErrorText="Необходимо ввести логин" InvalidResultType="Error"/>                            
                        </jBinding:jNullContextBinding>
                    </BaseControl:DataControl.jBinding>
                </TextBox>
            </Controls:LeftHeaderContainer>        
            <Controls:LeftHeaderContainer Header="Пароль:">
                <Controls:jPasswordBox x:Name="pwdTxt">
                    <BaseControl:DataControl.jBinding>
                        <jBinding:jNullContextBinding ElementPropertyPath="Password">
                            <BaseValidationRules:jNotEmptyStringRule ErrorText="Возможно вы не ввели пароль" InvalidResultType="Warning"/>
                        </jBinding:jNullContextBinding>
                    </BaseControl:DataControl.jBinding>
                </Controls:jPasswordBox>                
            </Controls:LeftHeaderContainer>
            <CheckBox Content="Запомнить меня" Name="rememberMy"/>
                <ContentPresenter Name="customContent"/>
            </StackPanel>
            </Border>    
</Authorization:AuthorizationControlBase>